package com.zifeng.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 船舶船只对象 ship
 *
 * @author zifeng
 * @date 2025-03-27
 */
@Data
public class Ship {
    private static final long serialVersionUID = 1L;

    /**
     * $column.columnComment
     */
    private Long id;

    /**
     * $column.columnComment
     */
    private String number;

    /**
     * $column.columnComment
     */
    private Long ownerId;

    /**
     * $column.columnComment
     */

    private String type;

    /**
     * $column.columnComment
     */
    private String typeDesc;

    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date buildYear;

    /**
     * $column.columnComment
     */
    private String buildPlace;

    /**
     * $column.columnComment
     */

    private long price;

    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date publishYear;

    /**
     * $column.columnComment
     */

    private String description;

    /**
     * $column.columnComment
     */
    private String photo;

    /**
     * $column.columnComment
     */
    private Long praise;

    /**
     * $column.columnComment
     */
    private String flagCountry;

    /**
     * $column.columnComment
     */
    private String hostType;

    /**
     * $column.columnComment
     */
    private String power;

    /**
     * $column.columnComment
     */
    private Long status;

    private int opType;

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("number", getNumber())
                .append("ownerId", getOwnerId())
                .append("type", getType())
                .append("typeDesc", getTypeDesc())
                .append("buildYear", getBuildYear())
                .append("buildPlace", getBuildPlace())
                .append("price", getPrice())
                .append("publishYear", getPublishYear())
                .append("description", getDescription())
                .append("photo", getPhoto())
                .append("praise", getPraise())
                .append("flagCountry", getFlagCountry())
                .append("hostType", getHostType())
                .append("power", getPower())
                .append("status", getStatus())
                .append("opType", getOpType())
                .toString();
    }
}
